﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace LynxWebLog
{
    [DataContract(Namespace = "http://schemas.datacontract.org/2004/07/LynxBlogAPI.Models")]
    public class MediaObjectData
    {
        [DataMember]
        public int objectid { get; set; }
        [DataMember]
        public string username { get; set; }
        [DataMember]
        public string name { get; set; }
        [DataMember]
        public string type { get; set; }
        [DataMember]
        public byte[] bits { get; set; }

        public MediaObjectData() { }

        public MediaObjectData(int objId, string userName, MediaObject mo)
        {
            this.objectid = objId;
            this.username = userName;
            this.name = mo.name;
            this.type = mo.type;
            this.bits = mo.bits;
        }

    }
}